import request from '@/utils/request'

const uri = '/productionOrder'

export function ProductionOrder (query) {
  return request({
    url: `${uri}`,
    method: 'get',
    params: query
  })
}

export function addProductionOrder (data) {
  return request({
    url: `${uri}`,
    method: 'post',
    data: data
  })
}

export function list (query) {
  return request({
    url: `${uri}/list`,
    method: 'get',
    params: query
  })
}

export function updateProductionOrder (query) {
  return request({
    url: `${uri}`,
    method: 'put',
    query
  })
}

export function getById (id) {
  return request({
    url: `${uri}/${id}`,
    method: 'get'
  })
}
